package com.telit.firecommand.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.telit.firecommand.entity.CommCommunicateRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface CommCommunicateRecordDao extends BaseMapper<CommCommunicateRecord> {

    /**
     * 查询对应火情最新的一次正在进行的通话记录
     *
     * @param fireId
     *
     * @return
     */
    List<CommCommunicateRecord> latestByFireId(@Param("fireId") Long fireId);

    /**
     * 查询某个发起人未完成的通话记录
     *
     * @return
     */
    List<CommCommunicateRecord> listBySponsor(@Param("sponsor") Long sponsor);

    CommCommunicateRecord latestOneByFireId(@Param("fireId") String fireId);

}